From: Rui Matos Date: Wed, 9 Jan 2013 01:01:59 +0000 (+0100) Subject: status/keyboard: Only change the current source setting if it changed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5086 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ca44977d92738dbcd03abfea05dff8a655bbf00f;p=gnome-shell.git status/keyboard: Only change the current source setting if it changed This avoids all the work that goes on in various processes when switching input sources if the activated source is the currently configured one. https://bugzilla.gnome.org/show_bug.cgi?id=691414 --- diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index c1b4ea1e2..590d2eeff 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -470,6 +470,8 @@ const InputSourceIndicator = new Lang.Class({ let is = new InputSource(type, id, displayName, shortName, i); is.connect('activate', Lang.bind(this, function() { + if (this._currentSource.index == is.index) + return; this._settings.set_value(KEY_CURRENT_INPUT_SOURCE, GLib.Variant.new_uint32(is.index)); }));